home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Snippets / Help Dialog / help.µ.rsrc / help.µ.rsrc.adf / TEXT_128.txt < prev    next >
Text File  |  1996-06-04  |  3KB  |  62 lines

  1. INTRODUCTION
  2.  
  3. What is Help Dialog?
  4.  
  5. Help Dialog is a freeware program which you can readily modify and adapt to provide your application with an "on-line" help capability.  Help Dialog was written in C using Metrowerks CodeWarrior.
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. As you can see, Help Dialog supports the integrated scrolling of styled text and pictures within a modal dialog box.  The text is provided by 'TEXT'/'styl' resources and the pictures are provided by 'PICT' resources.  The 'TEXT'/'styl' and 'PICT' resources utilized at any one time depends on the help topic chosen in the popup menu above.
  17.  
  18. Text/Picture Integration - The Non-Breaking Space Character
  19.  
  20. Text/picture integration is achieved using the same scheme as does SimpleText.  In this scheme, a  non-breaking space character (ASCII 0xCA) is inserted into the text (by pressing Option- Spacebar) to indicate where the top edge of a picture should go, and several carriage returns are then entered into the text to provide sufficient blank space vertically to accommodate the height of the picture.  The pictures are centered laterally in the destination rectangle when drawn.  
  21.  
  22. Separate 'PICT' resources with consecutively numbered IDs must be available for each non-breaking space character in the associated 'TEXT' resource. 
  23.     
  24. Are Pictures Really Necessary?
  25.  
  26. You do not have to include pictures in a help topic if you do not want to.  If the 'TEXT' resource for that particular topic has no non-breaking space characters, Help Dialog will quite happily accommodate that fact.
  27.  
  28. The Tester Module 
  29.  
  30. The two source files are helptester.c and help.c.  Certain lines of code in helptester.c are highlighted with ///////// at the end of each line.  These are the lines which must be included in the appropriate areas of your main program for the stuff in help.c to work.  Basically, you must:
  31.  
  32. ‚Ä¢     Insert your Help menu item into the Help menu.
  33.  
  34. ‚Ä¢     Detect mouse-downs in the Help menu.
  35.  
  36. ‚Ä¢     Determine if the Help menu item chosen was your Help item
  37.        and, if so, call the function doHelp, which is the core function
  38.       in help.c.
  39.  
  40. TextEdit Destination and View Rectangles
  41.  
  42. The TextEdit destination and view rectangles are established by a User Item in the dialog box (Item 2 in the DITL).  Accordingly, if the display is either too small or too large for you, just change the size of the User Item and reposition the scroll bar control accordingly.
  43.  
  44. Tricks of the Trade
  45.  
  46. The About Cricket popup menu item in this demo version has been included for two reasons.  The first reason is that it shows how you can fake the flowing of text around a picture.  The second, and somewhat insubstantial, reason is that the author is a cricket fanatic.  
  47.  
  48. 680x0 and PowerPC Ready
  49.  
  50. You can compile this thing as either 680x0 or PowerPC-native code. (The comment  // For PowerPC has been added to the lines in the source code which pertain to the PowerPC.)
  51.  
  52. Acknowledgements
  53.  
  54. The text/picture integration methodology, and the function actionProcedure, were adapted from James W. Walker's 1991 freeware program Show_help demo.
  55.  
  56. K. J. Bricknell
  57. <brick@spirit.com.au>
  58. Canberra
  59. Australia
  60. 1 June 1996
  61.  
  62.